package com.atguigu.common.exception;

import lombok.Data;

public enum BizCodeEnum {

    UNKNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "参数格式校验异常"),
    SMS_CODE_EXCEPTION(10002, "短信验证码频率高"),
    USER_EXIST_EXCEPTION(150001, "用户存在异常"),
    PHONE_EXIST_EXCEPTION(150002, "手机号存在异常"),
    LOGIN_ACC_PASS_INVALID_EXCEPTION(150002, "手机号存在异常"),
    NO_STOCK_EXCEPTION(21000,"商品库存不足"),
    TOO_MANY_REQUEST(10006,"请求过多");



    private Integer code;
    private String message;

    BizCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
